/*
 * RemoteControl.h
 *
 *  Created on: Jan 16, 2014
 *      Author: ppks
 */

#ifndef REMOTECONTROL_H_
#define REMOTECONTROL_H_

/********************************************************************************/
/* Configuration                                                                */
/********************************************************************************/
/* Filtering Options */
#define RC_RECEIVER_IIR_FILTER_ENABLED      1   /* Enables IIR FIlter */
#define RC_RECEIVER_IIR_FILTER_COEF         1   /* 1 - means 1/2 IIR, 2 means 1/4 IIR, etc.. */
#define RC_RECEIVER_IIR_SLOW_FILTER_COEF    2
#define RC_RECEIVER_IIR_THRESHOLD           10

#define RC_MIN_PULSE_VALUE                  900
#define RC_MAX_PULSE_VALUE                  2200

/********************************************************************************/
/* Exported Variables Declaration                                               */
/********************************************************************************/
extern uint8_t rcSerialCount;
extern int16_t rcSerial[];

/********************************************************************************/
/* Exported Functions Prototypes                                                */
/********************************************************************************/
void RC_ConfigureReceiver(void);
void RC_ProcessReceivedData(void);

#endif /* REMOTECONTROL_H_ */
